<?
/* http://kr.php.net/manual/en/function.include.php */
function get_include_contents($filename) {
	if (is_file($filename)) {
		ob_start();
		include $filename;
		$contents = ob_get_contents();
		ob_end_clean();
		return $contents;
	}
	return false;
}

function check_run($function) {
	if ( isset($function) )
		return $function();
}

function if_exists_include($file)
{
	if ( is_file($file) )
		include $file;
}

function if_exists_get_contents($file)
{
	return file_exists($file) ? get_include_contents($file) : '';
}

function import_css($file)
{
	return "\t".'<link rel="stylesheet" href="'.$file.'&mime=text/css" type="text/css" />'."\n";
}

function import_javascript($file)
{
	return "\t".'<script src="'.$file.'"&mime=text/javascript" type="text/javascript"></script>'."\n";
}

function build_meta($httpequiv, $content)
{
	return "\t".'<meta http-equiv="'.$httpequiv.'" content="'.$content.'" />'."\n";
}
